%% This file is luabidi.sty
%%
%% Copyright © 2009 Vafa Khalighi
%%
%%%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luabidi}[2009/04/01 v0.1
	Bidirectional typesetting in LuaTeX]
\def\setRTLmain{\pagedir TRT \bodydir TRT \pardir TRT \textdir TRT}
\def\setRTL{\pardir TRT \textdir TRT}
\def\setLTR{\pardir TLT \textdir TLT}
\let\unsetRTL=\setLTR
\let\unsetLTR=\setRTL
\def\RTL{\trivlist \pardir TRT \textdir TRT\item\relax}
\def\endRTL{\endtrivlist}
\def\LTR{\trivlist \pardir TLT \textdir TLT\item\relax}
\def\endLTR{\endtrivlist}
\DeclareOption{arabmaths}{\input{arabmaths}}
\DeclareOption{textwidthfootnoterule}{\input{textwidthfootnoterule}}


\def\Footnote#1{%
\begingroup
\footnotemark
\renewcommand{\thefootnote}{\@arabic\c@footnote}%
\pardir TLT \textdir TLT\footnotetext{#1}%
\endgroup
}

\DeclareOption{autofootnoterule}{\input{autofootnoterule}}



\ProcessOptions
\endinput
